package com.chinasofti.Collection;

import java.util.ArrayList;
import java.util.Collection;

public class Demo05 {
    public static void main(String[] args) {
        Collection<String> c = new ArrayList<>();
        //添加元素
        c.add("a");
        c.add("b");
        c.add("c");
        c.add("d");
        for( String str : c){
            str = "q";
            System.out.println("str = " + str);
        }
        System.out.println("c = " + c);
    }
}